/**
 * @Aurhor 把手给我
 * @Date 2022/6/13 16:06
 * @Version 1.0
 **/
package com.ft.controller;

import com.ft.domain.IndexPhone;
import com.ft.domain.IndexSmartWear;
import com.ft.service.IndexPhoneService;
import com.ft.service.IndexSmartWearService;
import com.ft.utils.Code;
import com.ft.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin//解决跨域问题
@RestController
@RequestMapping("/index/smartwear")
public class IndexSmartWearController {
    @Autowired
    IndexSmartWearService indexSmartWearService;
    @GetMapping()
    public Result selectAll(){
        List<IndexSmartWear> indexSmartWears = indexSmartWearService.selectAll();
        Result result = new Result(Code.GET_OK,indexSmartWears,"查询成功！");
        return result;
    }
}
